﻿@using ThirdPrize.Models
@model ThirdPrize.Models.ComicListModel

@{
    ViewBag.Title = "Comics";
}
<article class="comic">
    <table class="nurb-table">
        <tr>
            <td colspan="2" class="tab-left">
                <img src="~/Images/Nurbs/NurbsLogo.png" />
            </td>
            <td colspan="2" class="tab-right">
                @if (User.IsInRole("Administrator"))
                {
                    <a href="/Nurbs/ComicList">Manage Comic Episodes</a>
                }

            </td>
        </tr>
        <tr>
            <td class="tab-left">@Html.ActionLink("Latest", "Index", "Nurbs")</td>
            <td class="tab-left">@Html.ActionLink("About", "About", "Nurbs")</td>
            <td class="tab-right">@Html.ActionLink("Archive", "Archive", "Nurbs")</td>
            <td class="tab-right"><a href="~/NurbsFeed.XML">Rss Feed</a></td>
        </tr>
    </table>

    <h2>The Nurbs Archive</h2>



    <table class="nurb-table">
    @foreach (Comic e in Model.AllEpisodes)
    {
        <tr>
            <td class="tab-left archivecol1">
                @e.ComicNo
            </td>
            <td class="tab-left archivecol2">
               <a href="ShowComic?comicno=@e.ComicNo">@e.Title</a>

            </td>
            <td class="tab-left archivecol3">
                @if (!@e.Comment.IsEmpty())
                {
                    @(@e.Comment.Length>=100?  
                        @Html.Raw(@e.Comment.Substring(0,100)):
                        @Html.Raw(@e.Comment));

                }
            </td>
        </tr>
    }
     </table>


        <br />
</article>
